package BasicClass.Three;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Test_Six {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int size = Integer.parseInt(br.readLine());
        int[] arr = new int[size];
        String[] split = br.readLine().split(" ");
        int maxvalue = Integer.parseInt(split[0]);
        int minvalue = Integer.parseInt(split[0]);
        for (int i = 0; i < size; i++) {
            arr[i] = Integer.parseInt(split[i]);
            maxvalue = Math.max(maxvalue,arr[i]);
            minvalue = Math.min(minvalue,arr[i]);
        }
        Sort(arr,maxvalue,minvalue);
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i]+" ");
        }
    }

    /**
     * 给你一个n代表有n个数字，然后你需要使用计数排序将这些数字从小到大排好。
     * @param arr
     * @param maxvalue
     */
    public static void Sort(int[] arr, int maxvalue,int minvalue){
        int[] ints = new int[maxvalue-minvalue+1];
        for (int i = 0; i < arr.length; i++) {
            ints[arr[i]-minvalue]++;
        }
        int index = 0;
        for (int i = 0; i < arr.length; i++) {
            while (ints[index]==0){
                index++;
            }
            arr[i] = index+minvalue;
            ints[index]--;
        }
    }
}
